﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Presentation.Web.MVC.Client.ViewModels.IPagedView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Bank Account List
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

       <div style="text-align:right">
        <a href="<%: Url.Action("Create") %>">New</a>
       </div>
       <table>
        <tr>
            <th>Bank Account Number</th>
            <th>Bank Account Type</th>
            <th>User</th>
        </tr>
        <% foreach (BankAccount item in Model.PageItems) { %>
        <tr id="row-<%: item.UserId %>">
            <td>
                <%: Html.ActionLink(item.BankAccountNumber, "Details", "BankAccount", 
                    new RouteValueDictionary(new { bankAccountUserId = item.UserId}), null)%>
            </td>
            <td>
                <%: item.BankAccountType %>
            </td>
            <td>
                <%: item.UserId.ToString()%>
            </td>
        </tr>
        <% } %>
       <tr>
        <td colspan="4">
            <div id="pager" class="container-button">
                <% Html.RenderPartial("Pager",Tuple.Create("Index","BankAccount",Model)); %>
            </div>
        </td>
        </tr>
        </table>
</asp:Content>
